﻿
var app = angular.module("app", [
    'ngRoute'
]);

app.config(function ($routeProvider) {
    $routeProvider.when("/cliente", {
        templateUrl: "app/views/cliente.html"
    });

    $routeProvider.when("/producto", {
        templateUrl: "app/views/producto.html"
    });

    $routeProvider.when("/categoria", {
        templateUrl: "app/views/categoria.html"
    });

    $routeProvider.when("/proveedor", {
        templateUrl: "app/views/proveedor.html"
    });

    $routeProvider.when("/trabajador", {
        templateUrl: "app/views/trabajador.html"
    });

    $routeProvider.when("/ventas", {
        templateUrl: "app/views/ventas.html"
    });

    $routeProvider.when("/compras", {
        templateUrl: "app/views/compras.html"
    $routeProvider.when("/trabajador", {
        templateUrl: "app/views/trabajador.html"
    });

    $routeProvider.when("/persona", {
        templateUrl: "app/views/persona.html"
    $routeProvider.when("/compras", {
        templateUrl: "app/views/compras.html"
    });



});

app.controller("miController", function ($scope) {
    $scope.save = function () {
        console.log("Hola " + $scope.nombre);
    }
    $scope.clientes = [{ "id": "793d19c0-11e5-e411-bf05-e069958900b1", "ruc": "132131", "nombre": "Juan", "direccion": "puno", "fechaNac": "2015-04-17T09:55:01.373" }, { "id": "2e1031cb-11e5-e411-bf05-e069958900b1", "ruc": "132131", "nombre": "Juan 2", "direccion": "puno 2", "fechaNac": "2015-04-17T09:55:30.147" }, { "id": "d5ea5ed7-11e5-e411-bf05-e069958900b1", "ruc": "46464", "nombre": "Miguel", "direccion": "juliaca", "fechaNac": "2015-04-17T09:55:50.88" }]
});